package main;

import java.util.ArrayList;

import modele.City;
import modele.Inhabitant;
import modele.PromissoryLetter;
import modele.RegisteredLetter;
import modele.SimpleLetter;
import modele.UrgentLetter;

public class Main {

	public static void main(String[] args) {
		ArrayList<City> france = new ArrayList<City>();

		City lille = new City("Lille");
		france.add(lille);
		City paris = new City("Paris");
		france.add(paris);

		Inhabitant paul = new Inhabitant(lille);
		paul.setName("Paul MERLIN");
		paul.credit(100);
		Inhabitant liza = new Inhabitant(paris);
		liza.setName("Liza VONIEZ");
		liza.credit(100);
		Inhabitant ismail = new Inhabitant(paris);
		ismail.setName("Ismail BOHID");
		ismail.credit(100);
		Inhabitant taka = new Inhabitant(lille);
		taka.setName("Taka NAKAMURA");
		taka.credit(100);

		System.out.println("Day 1 - \n");

		SimpleLetter letter = new SimpleLetter(paul, liza, "hi marco, whassup bro?");
		paul.sendLetter(letter);

		SimpleLetter letter2 = new SimpleLetter(liza, ismail, "ur ma darlin baby");
		liza.sendLetter(letter2);

		PromissoryLetter contentletter3 = new PromissoryLetter(ismail, liza, 40);
		RegisteredLetter<?> letter3 = new RegisteredLetter(contentletter3);
		ismail.sendLetter(letter3);

		System.out.println("\nDay 2 - ");

		for (City c : france)
			c.distributeLetters();

		SimpleLetter contentletter4 = new SimpleLetter(liza, paul, "Let's go eat a pizza someday!");
		RegisteredLetter<?> regiscontentletter4 = new RegisteredLetter(contentletter4);
		UrgentLetter<?> letter4 = new UrgentLetter(regiscontentletter4);
		liza.sendLetter(letter4);

		System.out.println("\nDay 3 - ");
		for (City c : france)
			c.distributeLetters();
		
		PromissoryLetter contentletter5 = new PromissoryLetter(taka, ismail, 20);
		UrgentLetter<?> letter5 = new UrgentLetter(contentletter5);
		taka.sendLetter(letter5);
		
		System.out.println("\nDay 4 - ");
		for (City c : france)
			c.distributeLetters();

	}
}
